package com.cd.common.jpa.domain;

import com.cd.common.domain.BaseDomain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * @Description  没有nacos而临时创建的外部配置 只读不写 手写
 * @Author lqq
 * @Date 2025/5/31 9:28
 **/

@Entity
@Data
@Table(name = "db_external_config",
        indexes = {
                @Index(name = "idx_name", columnList = "name", unique = true)})
@NoArgsConstructor
@AllArgsConstructor
public class ExternalConfig extends BaseDomain {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    //name
    @Column(name = "name",length = 50)
    private String name;

    //name
    @Column(name = "value",nullable = false)
    private String value;
}
